package main

import (
	"fmt"
	"time"
)

func main() {
	intChan := make(chan int, 1)
	stringChan := make(chan string, 1)

	go func() {
		time.Sleep(1 * time.Second)
		intChan <- 1
	}()
	go func() {
		time.Sleep(1 * time.Second)
		stringChan <- "hello"
	}()

	select {
	case s1 := <-intChan:
		fmt.Println("s1", s1)
	case s2 := <-stringChan:
		fmt.Println("s2", s2)
	}
	fmt.Println("select 监控结束")
}
